package com.lebang.feign;

import com.lebang.model.RequestUserInfo;
import com.lebang.model.back.Result;
import com.lebang.feign.fallback.PointEarnedFallback;
import com.lebangweb.response.JsonData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "wangzhuan-earns", contextId = "wangzhuan-earns-point",fallback = PointEarnedFallback.class)
public interface PointEarnedFeign {
    @PostMapping("/app/ear/point/info")
     JsonData info(@RequestBody RequestUserInfo request);

    @PostMapping("/app/ear/point/pull")
     JsonData pull(@RequestBody RequestUserInfo request, @RequestParam("goldId") Integer goldId);

    @PostMapping("/app/ear/point/double")
     Result<Integer> pullDouble(@RequestBody RequestUserInfo request, @RequestParam("recordId") Long recordId);

    @PostMapping("/app/ear/point/cool")
     JsonData cool(@RequestBody RequestUserInfo request, @RequestParam("goldId") Integer goldId);
}
